Skip to content

docs(metrics): reference PeriodicExportingMetricReader usage with push exporters#4942

Open
chimchim89 wants to merge 1 commit intoopen-telemetry:mainfrom
chimchim89:docs/periodic-exporting-metric-reader-ref
Open

docs(metrics): reference PeriodicExportingMetricReader usage with push exporters#4942
chimchim89 wants to merge 1 commit intoopen-telemetry:mainfrom
chimchim89:docs/periodic-exporting-metric-reader-ref

Conversation

@chimchim89
Copy link

@chimchim89 chimchim89 commented Mar 1, 2026

Add PeriodicExportingMetricReader usage example to MeterProvider docstring

Description

The MeterProvider docstring in opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/__init__.py had a TODO comment in the metric_readers argument description:

TODO: reference PeriodicExportingMetricReader usage with push exporters here.

This PR resolves the TODO by:

  1. Replacing the TODO with a :class: cross reference to opentelemetry.sdk.metrics.export.PeriodicExportingMetricReader in
    the metric_readers arg description
  2. Adding a .. code-block:: python example demonstrating push based export setup using PeriodicExportingMetricReader and
    ConsoleMetricExporter, consistent in style with the existing Disable default views example in the same docstring

Type of change

  • This change requires a documentation update

How Has This Been Tested?

  • Ran tox -e lint
  • Ran tox -e py

Does This PR Require a Contrib Repo Change?

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@chimchim89 chimchim89 requested a review from a team as a code owner March 1, 2026 16:43
@xrmx xrmx moved this to Easy to review / merge / close in Python PR digest Mar 2, 2026
@xrmx xrmx added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Mar 2, 2026
Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@MikeGoldsmith MikeGoldsmith moved this from Easy to review / merge / close to Approved PRs in Python PR digest Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

Status: Approved PRs

Development

Successfully merging this pull request may close these issues.

4 participants